// 自动生成模板Interview
package power

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"time"
)

// interview表 结构体  Interview
type Interview struct {
	global.GVA_MODEL
	Answer         string     `json:"answer" form:"answer" gorm:"column:answer;comment:面试题答案;size:191;"`                         //面试题答案
	CompanyName    string     `json:"companyName" form:"companyName" gorm:"column:company_name;comment:公司名称;size:100;"`          //公司名称
	CreatedAt      *time.Time `json:"createdAt" form:"createdAt" gorm:"column:createdAt;comment:创建时间;"`                          //创建时间
	DeletedAt      *time.Time `json:"deletedAt" form:"deletedAt" gorm:"column:deletedAt;comment:删除时间;"`                          //删除时间
	Examine        int        `json:"examine" form:"examine" gorm:"column:examine;comment:0:未知状态;1:待审核;2:审核通过;3:审核拒绝;"`          //0:未知状态;1:待审核;2:审核通过;3:审核拒绝
	Founder        string     `json:"founder" form:"founder" gorm:"column:founder;comment:创始人;size:50;"`                         //创始人
	InterviewTitle string     `json:"interviewTitle" form:"interviewTitle" gorm:"column:interview_title;comment:面试题目;size:255;"` //面试题目
	Level1         *int       `json:"level1" form:"level1" gorm:"column:level1;comment:一级id;size:10;"`                           //一级id
	Level2         *int       `json:"level2" form:"level2" gorm:"column:level2;comment:二级ID;size:10;"`                           //二级ID
	Level3         *int       `json:"level3" form:"level3" gorm:"column:level3;comment:三级id;size:10;"`                           //三级id
	TagContent     string     `json:"tagContent" form:"tagContent" gorm:"column:tag_content;comment:标签内容;size:100;"`             //标签内容
	UpdatedAt      *time.Time `json:"updatedAt" form:"updatedAt" gorm:"column:updatedAt;comment:修改时间;"`                          //修改时间
}
type InterviewEsEdit struct {
	global.GVA_MODEL
	Founder        string     `json:"founder"` //创始人
	InterviewTitle string     `json:"interviewTitle"`
	Answer         string     `json:"answer"`
	CompanyName    []string   `json:"companyName" gorm:"-"`
	TagContent     []string   `json:"tagContent" gorm:"-"`
	Examine        int        `json:"examine"`
	Level1         *int       `json:"level1"`
	Level2         *int       `json:"level2"`
	Level3         *int       `json:"level3"`
	CreatedAt      *time.Time `json:"createdAt"`
	UpdatedAt      *time.Time `json:"updatedAt"`
	DeletedAt      *time.Time `json:"deletedAt"`
}

type Indicator struct {
	Name string `json:"name"`
	Max  int    `json:"max"`
}
type Data struct {
	Value []int  `json:"value"`
	Name  string `json:"name"`
	Lable struct {
		Show bool `json:"show"`
	} `json:"lable"`
}
type Series struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Data []Data `json:"data"`
}
type Info struct {
	Title struct {
		Text string `json:"text"`
	} `json:"title"`
	Legend struct {
		Data []string `json:"data"`
	} `json:"legend"`
	Radar struct {
		Indicator []Indicator `json:"indicator"`
	} `json:"radar"`
	Series    []Series `json:"series"`
	AxisLabel struct {
		FontSize int `json:"fontSize"`
		Rotate   int `json:"rotate"`
	} `json:"axisLabel"`
}

// 返回前端
type PowerViewInfo struct {
	Users          []int           `json:"users"`
	InterviewsNums []InterviewsNum `json:"interviews_nums"`
	UserExperts    []UserExpert    `json:"user_experts"`
}

// 面试题总数
type InterviewsNum struct {
	Name  string `json:"name" gorm:"name"`
	Count int    `json:"count" gorm:"count"`
}

// 掌握的总数
type UserExpert struct {
	Userid int    `json:"userid" gorm:"userid"`
	Name   string `json:"name" gorm:"name"`
	Count  int    `json:"count" gorm:"count"`
}

type NumInfo struct {
	Userid   int `json:"userid"`
	LevelId3 int `json:"level_id3"`
	Num      int `json:"num"`
}

// TableName interview表 Interview自定义表名 interview
func (Interview) TableName() string {
	return "interview"
}

type Ti struct {
	Name string `json:"name" gorm:"name"`
}
